package com.ruoyi.procategory.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.procategory.mapper.ProCategoryMapper;
import com.ruoyi.procategory.domain.ProCategory;
import com.ruoyi.procategory.service.IProCategoryService;

/**
 * 商品分类/类别Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-02-12
 */
@Service
public class ProCategoryServiceImpl implements IProCategoryService 
{
    @Autowired
    private ProCategoryMapper proCategoryMapper;

    /**
     * 查询商品分类/类别
     * 
     * @param id 商品分类/类别主键
     * @return 商品分类/类别
     */
    @Override
    public ProCategory selectProCategoryById(Long id)
    {
        return proCategoryMapper.selectProCategoryById(id);
    }

    /**
     * 查询商品分类/类别列表
     * 
     * @param proCategory 商品分类/类别
     * @return 商品分类/类别
     */
    @Override
    public List<ProCategory> selectProCategoryList(ProCategory proCategory)
    {
        return proCategoryMapper.selectProCategoryList(proCategory);
    }

    /**
     * 新增商品分类/类别
     * 
     * @param proCategory 商品分类/类别
     * @return 结果
     */
    @Override
    public int insertProCategory(ProCategory proCategory)
    {
        return proCategoryMapper.insertProCategory(proCategory);
    }

    /**
     * 修改商品分类/类别
     * 
     * @param proCategory 商品分类/类别
     * @return 结果
     */
    @Override
    public int updateProCategory(ProCategory proCategory)
    {
        return proCategoryMapper.updateProCategory(proCategory);
    }

    /**
     * 批量删除商品分类/类别
     * 
     * @param ids 需要删除的商品分类/类别主键
     * @return 结果
     */
    @Override
    public int deleteProCategoryByIds(Long[] ids)
    {
        return proCategoryMapper.deleteProCategoryByIds(ids);
    }

    /**
     * 删除商品分类/类别信息
     * 
     * @param id 商品分类/类别主键
     * @return 结果
     */
    @Override
    public int deleteProCategoryById(Long id)
    {
        return proCategoryMapper.deleteProCategoryById(id);
    }
}
